import App from './App'
import store from './store'
import auth from './plugins/auth'
import modal from './plugins/modal'
import tab from './plugins/tab'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'

Vue.config.productionTip = false
Vue.prototype.$store = store
Vue.prototype.$auth = auth
Vue.prototype.$modal = modal
Vue.prototype.$tab = tab

App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  app.use(store)
  app.provide('$auth', auth)
  app.provide('$modal', modal)
  app.provide('$tab', tab)
  return {
    app
  }
}
// #endif